class CategoriesDrugs < ActiveRecord::Migration
  def self.up
    create_table(:categories_drugs, :options=>"ENGINE=MyISAM", :id => false) do |t|
      t.integer :drug_id, :null => false 
      t.integer :category_id, :null => false
    end
    add_index(:categories_drugs, [:drug_id, :category_id])
    add_index(:categories_drugs, [:category_id, :drug_id])
  end

  def self.down
    drop_table :categories_drugs
  end
end
